package com.plian.system.entity.hr.recruitment;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @description:
 * @author: gangan
 * @create: 2020-04-01 15:19
 */
@Data
@TableName("hr_part_time_info")
@EqualsAndHashCode(callSuper = true)
public class PartTimeInfo extends BaseEntity {

    /**
     * 单据id
     */
    @ApiModelProperty(value = "单据id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long partTimeManagementId;

    /**
     * 人员主键
     */
    @ApiModelProperty(value = "人员主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long staffNameId;

    /**
     * 兼职企业名称
     */
    @ApiModelProperty(value = "兼职企业名称")
    private String partTimeEnterpriseName;
    /**
     * 兼职企业性质
     */
    @ApiModelProperty(value = "兼职企业性质")
    private String partTimeEnterpriseNature;
    /**
     * 拟兼任职务
     */
    @ApiModelProperty(value = "拟兼任职务")
    private String proposedConcurrentPost;

    /**
     * 拟兼职结束时间
     */
    @ApiModelProperty(value = "拟兼职结束时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @TableField(value = "part_time_end_time", updateStrategy = FieldStrategy.IGNORED)
    private Date partTimeEndTime;

    /**
     * 拟兼职开始时间
     */
    @ApiModelProperty(value = "拟兼职开始时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @TableField(value = "part_time_start_time", updateStrategy = FieldStrategy.IGNORED)
    private Date partTimeStartTime;

    /**
     * 拟兼职理由
     */
    @ApiModelProperty(value = "拟兼职理由")
    private String partTimeJobReason;

    /**
     * 免职时间
     */
    @ApiModelProperty(value = "免职时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @TableField(value = "removal_time", updateStrategy = FieldStrategy.IGNORED)
    private Date removalTime;


    /**
     * 拟免职理由
     */
    @ApiModelProperty(value = "拟免职理由")
    private String removalJobReason;

    /***************新增字端***************/

    /**
     * 是否按干部权限报批（默认是0，1否）
     */
    @ApiModelProperty(value = "是否按干部权限报批（默认是0，1否）")
    private Integer cadrePermissionsStatus;

    /**
     * 所在企业党组织意见
     */
    @ApiModelProperty(value = "所在企业党组织意见")
    private String companyPartyOrgOpinion;

    /**
     * 审批机构意见
     */
    @ApiModelProperty(value = "审批机构意见")
    private String approvedOpinion;

    /**
     * 国资监管机构意见
     */
    @ApiModelProperty(value = "国资监管机构意见")
    private String gzRegulationOpinion;

    /**
     * 目前是否兼职（兼职时间和当前时间进行比对）
     * 目前是否兼职是0,1否
     */
    @ApiModelProperty(value = "目前是否兼职是0,1否")
    @TableField(exist = false)
    private Integer nowPartTimeStatus;

}
